/*
 * @Author: 高瑞寒 15932717091@163.com
 * @Date: 2022-05-17 22:48:58
 * @LastEditTime: 2022-05-18 22:06:14
 * @LastEditors: 高瑞寒 15932717091@163.com
 * @Description:
 */
import i18n from '@/i18n'
import { watch } from 'vue'
import store from '@/store'
export const generateTitle = (title) => {
  return i18n.global.t('route.' + title)
}
export const watchSwitchLang = (...cbs) => {
  watch(
    () => store.getters.language,
    () => cbs.forEach(cb => cb(store.getters.language)))
}
